package im.oen.boot.common.utils;

import im.oen.boot.common.data.Base;
import im.oen.boot.common.data.Entry;

import java.lang.reflect.Field;
import java.util.List;

/**
 * 数据脱敏工具
 *
 * @author Kevin.Xu
 */
public class Maskings {

    public static String toJson(Base obj) {
        List<Field> fields = ReflectUtil.fetchFields(obj.getClass());
        StringBuilder sb = new StringBuilder("{");
        for (Field field : fields) {
            Entry<String, Object> entry = ReflectUtil.fetch(obj, field);

        }
        sb.append("}");
        return sb.toString();
    }

    public static String toXml(Base obj) {
        return null;
    }
}
